package com.baymax.test.scene.demo

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.inputmethod.EditorInfo
import com.baymax.test.scene.BaseScene
import com.baymax.test.scene.addText
import com.baymax.test.scene.newScrollContainer
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

/**
 * @title:       标题
 * @project:     TestScene
 * @package:     com.baymax.test.scene.demo
 * @class:       TextInputScene
 * @description:
 * <p>
 * 类描述
 * </p>
 *
 * @version:   1.0
 * @createDate:   2022/7/15 14:47
 * @Copyright (C) 2022 YSTEN
 * @author:       xuyujian
 */
class TextInputScene : BaseScene() {
    override fun onCreateView(p0: LayoutInflater, p1: ViewGroup, p2: Bundle?): View {
        return p1.newScrollContainer {
          val txt =  addText("hello")
            launch{
                delay(1000)
                txt.inputType = EditorInfo.TYPE_CLASS_TEXT or EditorInfo.TYPE_TEXT_VARIATION_PASSWORD
            }
        }
    }
}